#ifndef BLOCK_H_
#define BLOCK_H_

#include <SFML/Graphics.hpp>
#include <string>
#include <iostream>
#include "var_define.h"

using namespace std;
using namespace sf;


typedef struct {
	bool left, right, top, bottom;
} Stop;

typedef struct {
	bool dir;
	string map;
	int x;
	int y;
} Dir;


class Block {
	public:
		Block(int x = 0, int y = 0, string img = "", bool wall = false, bool act = false);
		void	setImage(Image * img);
		void	setImage(string img);
		void	setActive();
		void	setCoords(int x, int y);
		void	setBlocked();
		void	setUnblocked();
		void	setPnj(bool b);
		void	setRencontre(bool b);
		void	setBorderTop();
		void	setBorderBottom();
		void	setBorderLeft();
		void	setBorderRight();
		void	setDir(string map, int dirX, int dirY);

		bool	getPnj();
		int		getPositionX();
		int		getPositionY();
		Image	getImage();
		bool	isActive();
		bool	isBlocked();
		bool    isPossible();
		bool	canGoOn(int direction);
		bool	isTeleport();
		Dir		getTeleport();


	private:
		string	typeBlock;
		bool	active;
		int		x;
		int		y;
		Image	imgBlock;
		bool	wall;
		bool    pnj;
		bool    rencontrePossible;
		Stop	bords;
		Dir		teleport;
};

#endif
